Pulling Tenant Data from VOCA CIC storage via API
To securely pull Tenant’s data from Voca Storage, use the following external APIs:
Get Token: https://<domain>:5080/api/DataExport/External/token
files using the `/api/DataExport/External/Files` API (see the next section).
Usage
|
■
|
URL: https://<domain>:5080/api/DataExport/External/token |
|
■
|
Request Headers: x-api-key: <user-api-key> |
|
■
|
The API key is generated in the UI during the initialization process. |
Responses
|
■
|
200 OK: Token generation was successful. |
{"token": "123e4567-e89b-12d3-a456-426614174000"}
|
■
|
401 Unauthorized: Invalid API key |
|
■
|
500 Internal Server Error: Failed to generate the token |
Get Files: https://<domain>:5080/api/DataExport/External/Files
This API is triggered by users to obtain download links to a tar file containing CSV files representing their data stored in the Voca Storage account. The user must provide a valid token, which can be retrieved using the `/api/DataExport/External/token` API.
Usage
|
■
|
URL: https://<domain>:5080/api/DataExport/External/Files |
|
■
|
Request Headers: `Authorization: Bearer <token>` |
The token is generated via the /api/DataExport/External/token API.
Responses
|
■
|
200 OK: Successfully retrieved file URLs. |
Example Response Body
[
"https://<AzureResourceName>.blob.core.windows.net/<containerName>/<fileName>.tar",
"https://<AzureResourceName>.blob.core.windows.net/<containerName>/<fileName>.tar"
]
|
■
|
401 Unauthorized: Invalid token. |
|
■
|
500 Internal Server Error: Failed to retrieve file links. |
|
●
|
The download links provide access to the `.tar` files from Voca Storage. |
|
●
|
The links are valid for 30 minutes and must be used before they expire. |
|
●
|
Ensure that the token is still valid; it expires 1 hour after generation. |